package com.qfjy.service.impl;

import com.qfjy.entity.po.User;
import com.qfjy.entity.vo.UserVO;
import com.qfjy.mapper.UserMapper;
import com.qfjy.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Transactional
@Slf4j
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectList() {
        return userMapper.selectList();
    }

    @Override
    public int insertBatchUsers(List<User> users) {
        return userMapper.insertBatchUsers(users);
    }

    @Override
    public int deleteById(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteBatch(Integer[] userIds) {
        return userMapper.deleteBatch(userIds);
    }

    @Override
    public int updateUserStatusById(int status, int id) {
        return userMapper.updateUserStatusById(status,id);
    }

    @Override
    public List<User> listCondition(UserVO userVO) {
        return userMapper.listCondition(userVO);
    }

    @Override
    public User selectUserByWid(int wid) {
        return userMapper.selectUserByWid(wid);
    }

    @Override
    public int updateUserWidByEmail(String wid, String email) {
        return userMapper.updateUserWidByEmail(wid,email);
    }

    @Override
    public User getUserByEmail(String email) {
        return userMapper.getUserByEmail(email);
    }

    @Override
    public int updateByPrimaryKeySelective(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }

    @Override
    public List<User> selectUserByMeetingGrabPid(String pid) {
        return userMapper.selectUserByMeetingGrabPid(pid);
    }


}
